/**
 * 
 */
package com.gmail.blackdog1987.carcare.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import com.gmail.blackdog1987.carcare.BaseActivity;
import com.gmail.blackdog1987.carcare.R;

public class CarChangeTypeActivity extends BaseActivity implements OnClickListener {

	Intent i;
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_carchange_type);
		initViews();
		initData(savedInstanceState);
		reg();
		i = new Intent(CarChangeTypeActivity.this, CarChangeActivity.class);
	}

	public void initViews() {}

	public void reg() {
		findViewById(R.id.carchange_inside).setOnClickListener(this);
		findViewById(R.id.carchange_outside).setOnClickListener(this);
		findViewById(R.id.carchange_light).setOnClickListener(this);
		findViewById(R.id.carchange_moto).setOnClickListener(this);
		findViewById(R.id.back).setOnClickListener(this);
	}

	public void initData(Bundle savedInstanceState) {}

	@Override
	public void onClick(View v) {

		switch (v.getId()) {
		case R.id.carchange_inside:
			i.putExtra("type", 1);
			startActivity(i);
			break;
		case R.id.carchange_outside:
			i.putExtra("type", 2);
			startActivity(i);
			break;
		case R.id.carchange_light:
			i.putExtra("type", 3);
			startActivity(i);
			break;
		case R.id.carchange_moto:
			i.putExtra("type", 4);
			startActivity(i);
			break;
		case R.id.back:
			finish();
			break;
		default:
			break;
		}

	}
}
